using CNav.Business.Services;
using CNav.Common;
using CNav.DataEntity;
using CNav.Repository;
using CNav.Repository.UoV;
using Microsoft.Practices.Unity;

namespace CNav.Business
{
    public static class Bootstrapper
    {
        public static void Initialise(IUnityContainer childContainer)
        {
            childContainer.RegisterType<IUnitOfWork, UnitOfWork>(new HttpContextLifetimeManager<IUnitOfWork>());
            childContainer.RegisterType(typeof(IRepository<>), typeof(Repository<>));

            childContainer.RegisterType<ISecurityService, SecurityService>();
            childContainer.RegisterType<IBusinessAccountService, BusinessAccountService>();
            childContainer.RegisterType<IUserAccountService, UserAccountService>();
            childContainer.RegisterType<IGeneralService, GeneralService>();
            childContainer.RegisterType<IAddressService, AddressService>();
            childContainer.RegisterType<IComplaintService, ComplaintService>();
            childContainer.RegisterType<IProductService, ProductService>();
            childContainer.RegisterType<ISearchService, SearchService>();
            childContainer.RegisterType<IConsumerService, ConsumerService>();
            childContainer.RegisterType<IUiService, UiService>();
            childContainer.RegisterType<IAdminConfigurationService, AdminConfigurationService>();
            childContainer.RegisterType<IConfigurationService, ConfigurationService>();
            childContainer.RegisterType<IEnquiryService, EnquiryService>();
            
        }
    }
}